// 买卖占比
<template>
  <div class="">
    <span
      :class="data.buyPercent > data.sellPercent ? 'lojnnfet' : 'lojnnfetb'"
    >
      <span class="labelmm aa" v-if="data.buyPercent > data.sellPercent"
        >买</span
      >
      <span class="labelmm ab" v-else>卖</span>
      {{ getBfb(data) }} %
    </span>
  </div>
</template>
 <script lang='ts' setup>
const props = defineProps({
  data: { type: Object },
});
const getBfb = (data) => {
  let jiage = "";
  if (data.buyPercent > data.sellPercent) {
    jiage = (data.buyPercent * 100).toFixed(0);
  } else {
    jiage = (data.sellPercent * 100).toFixed(0);
  }
  return jiage;
};
</script>
 <style scoped>
</style>